From 69423bb7278923ef476b5871b72aa3559b7f37a1 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Fri, 4 Nov 2005 20:24:48 +0000 Subject: [PATCH] Fix unicode reading on Big Endian hosts. --- gpsbabel/cet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpsbabel/cet.c b/gpsbabel/cet.c index 4b8890882..ff9dc0e5e 100644 --- a/gpsbabel/cet.c +++ b/gpsbabel/cet.c @@ -345,14 +345,14 @@ cet_str_uni_to_utf8(const short *src, const int length) cin = (unsigned short *)src; while (i-- > 0) - len += cet_ucs4_to_utf8(NULL, 6, *cin++); + len += cet_ucs4_to_utf8(NULL, 6, le_read16(cin++)); res = cout = xmalloc(len + 1); cin = (unsigned short *)src; i = length; while (i-- > 0) - cout += cet_ucs4_to_utf8(cout, 6, *cin++); + cout += cet_ucs4_to_utf8(cout, 6, le_read16(cin++)); *cout = '\0'; -- 2.30.2